
package eSchool.BL;

import eSchool.DataLayer.DAOFactory;
import eSchool.DataLayer.IAlunoDAO;
import java.io.Serializable;

public class Alunos extends BasicListObject<Aluno> implements IDadosEntidade, Serializable{

    Aluno al = new Aluno();

    public Alunos(){
    }
    
    public Alunos(CriteriosPesquisa criterios) throws Exception{
        this.leDados(criterios);
    }
    
    public String[][] toStringArray () {
        return null;
    }

    @Override
    public int getColumnCount() {
        return al.getColumnCount();
    }

    @Override
    public String getColumnName(int columnIndex) {
        return al.getColumnName(columnIndex);
    }

    @Override
    public Class<?> getColumnClass(int columnIndex) {
        return al.getColumnClass(columnIndex);
    }
    
    public Object getValueAt(int rowIndex, int columnIndex){
            return this.get(rowIndex).getValueAt(0, columnIndex);
    } 

    public void setValueAt(Object aValue, int rowIndex, int columnIndex){
            this.get(rowIndex).setValueAt(aValue, 0, columnIndex);
    }



    @Override
    public void leDados() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
    public void leDados(CriteriosPesquisa criterios) throws Exception {
         DAOFactory factory = DAOFactory.getDAOFactory(DAOFactory.ACCESS);
         IAlunoDAO alunoDAO = factory.getAlunoDAO();           
         alunoDAO.selectAlunoTO(this, criterios);
    }

    @Override
    public void gravaDados() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
        
}
